package com.ef.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ef.constant.ECallStatus;
import com.ef.constant.ELeadsEventType;

@Entity
public class CorpEventHistory implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	@ManyToOne(fetch = FetchType.EAGER)
	private User operater;

	@Temporal(TemporalType.TIMESTAMP)
	private Date dealTime;

	/**
	 * 拨打的电话号码
	 */
	@Column(length = 20)
	private String telephone;

	@Column(length = 500)
	private String comments;

	@Enumerated(value = EnumType.STRING)
	private ELeadsEventType eventType;

	@Enumerated(value = EnumType.STRING)
	private ECallStatus callStatus;

	@ManyToOne(fetch = FetchType.LAZY)
	private Company company;

	public User getOperater() {
		return operater;
	}

	public void setOperater(User operater) {
		this.operater = operater;
	}

	public ECallStatus getCallStatus() {
		return callStatus;
	}

	public void setCallStatus(ECallStatus callStatus) {
		this.callStatus = callStatus;
	}

	public Date getDealTime() {
		return dealTime;
	}

	public void setDealTime(Date dealTime) {
		this.dealTime = dealTime;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public ELeadsEventType getEventType() {
		return eventType;
	}

	public void setEventType(ELeadsEventType eventType) {
		this.eventType = eventType;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}
}
